<script>
	$(document).ready(function(){
        $('.form-horizontal').formParse({
			data: <?= json_encode($data) ?>,
			ajax: true,
			specialFields: ['catalogues']
		});
		$('#tab4_check').click(function(){
			$('.form-horizontal [name="catalogues[]"]').attr('checked',this.checked);
		})
		$('#selectfile').uploadInit({
			url: '<?= url_create('admin', 'file', 'upload') ?>',
			multi_selection: false,
			imageContainer: $('#albumImage'),
			imageVar: 'image_id'
		})
    });
</script>